home *** CD-ROM | disk | FTP | other *** search
- Path: news.internet.com.mx!usenet
- From: elask@internet.com.mx
- Newsgroups: comp.lang.c++
- Subject: Comunications using RS-232, OWL,I cant read a complete data stream using EV_RXFLAG
- Date: 27 Mar 1996 04:59:16 GMT
- Organization: Internet de Mexico S.A. de C.V.
- Message-ID: <4jahv4$fqu@news.internet.com.mx>
- NNTP-Posting-Host: inter023.internet.com.mx
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
-
-
- Anyone could help me?
-
- First, I dont speak English well, so please try to understand what I
- want to say.
- I'm studying electronic engineering and my final work (Thesis) is a
- project that consist in: a processor (MC68HC11) that must sense four
- pressures and process them to control a fan. The data acquired with this
- processor must be send to a computer. I'm a C/C++ programer and I bought
- Borland C++ v.4.01 to make my PC programs. I must to do one version for
- DOS and one another for Windows. The communication between the HC11
- processor and PC is RS-232. I'm prgraming in Windows with Comm. events.
- My data consist in one start byte(0x10), five data(4 bytes each), and
- one final byte(End mark: 0x11), 22 bytes total transmited each second. I
- use Notification functions (OWL's EnableCommNotify(HmyWindow,22,-1)
- communications functions(OWL's SetEventMask(EV_TXFLAG)), etc..
- I set the fEvt bit and I specify EvtChar as 0x10(the first byte in the
- comunication stream, this to notify my program about incoming data). First
- I turned off fBinary bit, and I can'd receive any data. Then I turned on
- this flag, so I can receive data, but not complete. My program recognizes
- the EV_RXFLAG but does not receive the 22 bytes of my data stream. So I
- specify EofChar as 0x11(the last byte in the stream, the End Mark), and
- the problem is the same.
- The problem is that I can only receive this Com event when I turn on the
- fBinary bit in the tagDCB structure and the data stream is not received
- correctly(in fact, only three bytes can I read using
- ReadComm(Id,*lpBuffer,22). Why can't I read my complete data stream?. Thus
- when the response function enters, suddenly enters again and don't wait 1
- second(time between transmissions), after this second entry the response
- funtion enters after a second.
-
-
- My name is Tomas Covarrubias V.
- E-Mail address: elask@internet.com.mx
-
-